#ifndef QSTEREOWAVEFORMDRAWING_H_E5EB0B8F_BD13_4E52_9BEF_5A429C5961AD
#define QSTEREOWAVEFORMDRAWING_H_E5EB0B8F_BD13_4E52_9BEF_5A429C5961AD

#include "AudioUtils_global.h"

#include <QColor>

class QPainter;
class QRect;

namespace AudioUtils {

class QAudioReader;
class QAudioFormat;

class AUDIOUTILS_EXPORT QStereoWaveformDrawing
{
public:
	QStereoWaveformDrawing();
	~QStereoWaveformDrawing();

	void setLeftLineColor(QColor color);
	QColor GetLeftLineColor() const;

	void setRightLineColor(QColor color);
	QColor GetRightLineColor() const;

	void setBackGroundColor(QColor color);
	QColor getBackGroundColor() const;

public:
	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader, 
		const QRect& rect
		);

	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		quint64 startSample,
		quint64 stopSample
		);

	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		double startSeconds,
		double stopSeconds
		);

private:
	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		quint64 startSample,
		quint64 stopSample,
		int channel // 0: left 1: right
		);

private:
	QColor backgroundColor;
	QColor lefeLineColor;
	QColor rightLineColor;
};

}

#endif // QSTEREOWAVEFORMDRAWING_H_E5EB0B8F_BD13_4E52_9BEF_5A429C5961AD

